package com.qdlc.p2p.biz.service;

import com.qdlc.p2p.dal.common.model.jpa.PageDataList;
import com.qdlc.p2p.dal.dto.Operator;
import com.qdlc.p2p.dal.dto.UserIdentify;
import com.qdlc.p2p.dal.model.UserIdentifyModel;
import com.qdlc.p2p.dal.model.UserModel;

/**
 * 认证信息
 *
 * @author sj
 * @version 2.0
 * @since 2014年2月17日17:27:02
 */
public interface UserIdentifyService {

	/**
	 * 登录到个人中心，获得用户认证的状态并显示
	 *
	 * @param userId
	 * @return
	 */
	public UserIdentify findByUserId(long userId);

	/**
	 * 更新实名认证状态real_name_status
	 *
	 * @param userId
	 */
	public void modifyRealnameStatus(long userId, int status, int preStatus) throws Exception;

	/**
	 * 更新绑定认证信息状态tpp_mobile_phone_status
	 *
	 * @param userId
	 */
	public void modifyTppMobilePhoneStatus(long userId, int status, int preStatus) throws Exception;

	/**
	 * 更新第三方认证平台绑定状态
	 *
	 * @param userId
	 */
	public void modifyTppAuthorizeStatus(long userId, boolean authorize, String authorizeType) throws Exception;

	/**
	 * 得到单个用户的认证状态
	 *
	 * @param userId
	 * @return
	 */
	public UserIdentify getUserIdentifyByUserId(long userId);

	/**
	 * 审核用户认证信息
	 *
	 * @param id
	 * @param realNameVerifyRemark
	 * @param realNameStatus
	 * @param operator
	 */
	public void userAttestationEdit(long id, String realNameVerifyRemark, int realNameStatus, Operator operator);

	/**
	 * 统计等待审核的实名认证总数
	 *
	 * @param status
	 * @return
	 */
	public int countByRealName(int status);

	/**
	 * 通过ID查询记录
	 *
	 * @param id
	 * @return
	 */
	public UserIdentify findById(long id);

	public PageDataList<UserIdentifyModel> findUserIdentifylist(UserIdentifyModel model);

	public PageDataList<UserIdentifyModel> findUserIdentifylist(int pageNumber, int pageSize, UserIdentify model,
			String searchName);

	public PageDataList<UserModel> userModelList(int pageNumber, int pageSize, UserIdentify model, String searchName);

}
